﻿using System;

namespace NetActive.Notifications.Services.WP7.Interfaces
{
    public interface INotification
    {
        /// <summary>
        /// Gets or set the Uri of the notification channel to send this message to.
        /// </summary>
        Uri ClientNotificationChannelUri { get; set; }

        /// <summary>
        /// Unique message ID, used to track the message after completion.
        /// </summary>
        Guid? UUID { get; set; }

        /// <summary>
        /// Gets or sets a user state object. This object is returned in all callback events.
        /// </summary>
        object UserState { get; set; }

        /// <summary>
        /// Internal counter for the number of attempts needed to send this notification.
        /// </summary>
        int NumberOfAttempts { get; set; }

        /// <summary>
        /// Gets or sets the delivery interval for this notification.
        /// </summary>
        NotificationDeliveryInterval DeliveryInterval { get; set; }

        /// <summary>
        /// Gets the string representing the target header for this notification type.
        /// </summary>
        string TargetHeader { get; }

        /// <summary>
        /// Method used to return a byte representation of the notification ready to send to the Push Notification Services.
        /// </summary>
        /// <returns>Byte representation of the notification.</returns>
        byte[] GetBytes();

        /// <summary>
        /// Returns and integer value representing the selected <seealso cref="INotification.DeliveryInterval"/>.
        /// </summary>
        /// <returns>Integer value representing the delivery interval.</returns>
        int GetDeliveryInterval();
    }
}
